
export default  function(options){
  // resolve 和reject 本身就是回调函数
  return  new Promise((resolve,reject)=>{
      wx.request({
        url: options.url,
        data: options.data,
        timeout:6000,
        header: {
          'content-type': 'application/json' // 默认值
        },
        method:options.method || "get",
        success: resolve,
        fail: reject,
       
      })
  })
}